<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>新建分组</title>
<!--公共样式开始-->
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/reset.css">
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/common.css">
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Plugins/FontAwesome/css/font-awesome.min.css">
<!--公共样式结束-->
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/module_form.css">
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/page_memberAdd.css">
<script src="{$NOW_THEME_URL}/Assets/Js/jquery.min.js"></script>
<script src="{$NOW_THEME_URL}/Assets/Js/jquery.timer.js"></script>
<script src="{$NOW_THEME_URL}/Assets/Js/common.js"></script>
</head>

<body>
<!-- 	<div class="table_tool">
		<ul class="clearfix">			
			<li class="btn"><i class="icon-plus"></i> 新建分组</li>
		</ul>
	</div> -->
	<div class="page_wraper" style="margin-top:20px;">
			<form action="" method="post" id="memberAdd_form">
				<table cellpadding="0" cellspacing="0" class="module_form">
					<fieldset>
						<tr>
							<td style="width: 100px;"><label for="cardnum">分组名称：<em>*</em></label></td>
							<td class="ele_content">
								<input value="{$data.title}" type="text" id="title" class="form_ele_text width_200">
							</td>
						</tr>
					</fieldset>
				</table>
			</form>
	</div>
	<div class="page_footer pdtd10">
		<input type="button" name="submit" value="确认修改"  class="form_ele_submit"/>
		<input type="reset" name="reset" value="重置表单"  class="form_ele_reset"/>
	</div>
</body>
<script type="text/javascript">
	//弹出窗口全局变量
	var api = frameElement.api, W = api.opener;

	$(function(){
		//重置
		$('.form_ele_reset').on('click',function(){
			frameApi.close(); //关闭当前窗口
		});
		
		//提交
		$('.form_ele_submit').on('click',function(){
			
			var tipsObj = windowApi.lhgdialog.tips('正在提交数据...',10,etIcon.loading);
			
			//通过Ajax提交表单
			var postData = {};
			postData.title   = $('#title').val(); //获取分组名称
			
			$.post("{:U('Custom/groupAdd')}", postData ,function(data){
				if(data.status==1){
					windowApi.lhgdialog.tips('数据修改成功！');
					frameApi.close(); //关闭当前窗口
					var obj = windowApi.lhgdialog.list['Custom_group'];
					obj.reload(obj);
				}else{
					windowApi.lhgdialog.alert(data.info);
				}
			});
		});
	});
</script>
</html>
